import type { RouteRecordRaw } from 'vue-router';

import { BasicLayout } from '#/layouts';
import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'lucide:layout-dashboard',
      order: -1,
      title: '系统管理',
    },
    name: 'System',
    path: '/system',
    children: [
      {
        name: 'Auth',
        path: 'auth',
        meta: {
          affixTab: true,
          icon: 'lucide:area-chart',
          title: '权限管理',
        },
        children: [
          {
            name: 'DeptManager',
            path: 'dept-manager',
            component: () => import('#/views/system/dept/dept-lit.vue'),
            meta: {
              icon: 'carbon:workspace',
              title: '部门管理',
            },
          },
          {
            name: 'RoleManager',
            path: 'role-manager',
            component: () => import('#/views/system/role/role-lit.vue'),
            meta: {
              icon: 'carbon:workspace',
              title: '角色管理',
            },
          },
          {
            name: 'PositionManager',
            path: 'position-manager',
            component: () => import('#/views/system/post/post-lit.vue'),
            meta: {
              icon: 'carbon:workspace',
              title: '岗位管理',
            },
          },
          {
            name: 'UserManager',
            path: 'user-manager',
            component: () => import('#/views/dashboard/workspace/index.vue'),
            meta: {
              icon: 'carbon:workspace',
              title: '用户管理',
            },
          },
        ],
      },
      {
        name: 'Content',
        path: '/content',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          icon: 'carbon:workspace',
          title: '内容管理',
        },
        children: [
          {
            name: 'Model',
            path: 'model',
            component: () => import('#/views/dashboard/workspace/index.vue'),
            meta: {
              icon: 'carbon:workspace',
              title: '业务模块',
            },
          },
          {
            name: 'Menu',
            path: 'menu',
            component: () => import('#/views/dashboard/workspace/index.vue'),
            meta: {
              icon: 'carbon:workspace',
              title: '菜单管理',
            },
          },
          {
            name: 'Cict',
            path: 'dict',
            component: () => import('#/views/dashboard/workspace/index.vue'),
            meta: {
              icon: 'carbon:workspace',
              title: '字典管理',
            },
          },
          {
            name: 'Config',
            path: 'config',
            component: () => import('#/views/dashboard/workspace/index.vue'),
            meta: {
              icon: 'carbon:workspace',
              title: '参数管理',
            },
          },
          {
            name: 'Notice',
            path: 'notice',
            component: () => import('#/views/dashboard/workspace/index.vue'),
            meta: {
              icon: 'carbon:workspace',
              title: '通知公告',
            },
          },
        ],
      },
      {
        name: 'Monitor',
        path: '/monitor',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          icon: 'carbon:workspace',
          title: '系统监控',
        },
        children: [
          {
            name: 'Online',
            path: 'online',
            component: () => import('#/views/dashboard/workspace/index.vue'),
            meta: {
              icon: 'carbon:workspace',
              title: '在线用户',
            },
          },
          {
            name: 'Task',
            path: 'task',
            component: () => import('#/views/dashboard/workspace/index.vue'),
            meta: {
              icon: 'carbon:workspace',
              title: '定时任务',
            },
          },
        ],
      },
    ],
  },
];

export default routes;
